package com.delianna.bwt.helpers;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;

import com.delianna.bwt.models.Port;

/**
 * @author Delio Castillo (jangeador@gmail.com)
 *
 */
public class CommonHelper {

	//Sort a list of Ports Alphabetically
	//by Port Name
	public static List<Port> SortPortList(List<Port> ports){
		Collections.sort(ports, new Comparator<Port>() {
			public int compare(Port o1, Port o2) {
				return o1.port_name.compareToIgnoreCase(o2.port_name);
			}
		});
		return ports;
	}
	
}
